<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html lang="zh-CN">

<head>
<meta charset="UTF-8">
<title>角色管理</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="style/bootstrap.css" />
<link rel="stylesheet" href="style/index.css" />
</head>

<body>
	<div class="container-fluid">
		<div class="row">
			<div class="col-md-12">
				<h1 class="page-header">
					角色管理 <small>角色列表</small>
				</h1>
			</div>
		</div>
		<div class="row">
			<div class="col-md-12">
				<!-- 角色列表--bootstrap高级表格使用 -->
				<div class="panel panel-default">
					<div class="panel-heading">角色列表</div>
					<div class="panel-body">
						<!--table-responsive响应式表格，会自动添加滚动条-->
						<div class="table-responsive">
							<input class="btn btn-success" id="addRole" type="button"
								value="添加角色">
							<table class="table">
								<thead>

									<tr>
										<th><input type="checkbox" value=""></th>
										<th>编号</th>
										<th>角色名</th>
										<th>备注</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody>
									<c:forEach items="${list}" var="role">
										<tr class="odd gradeX">
											<th><input type="checkbox" value=""></th>
											<td>${actor.roleId}</td>
											<td>${actor.rname}</td>
											<td>${actor.permission}</td>
											<td><a title="修改" href="/RoleServlet?id=${actor.roleId}&flag=edit"
												class="t-edit glyphicon glyphicon-pencil"></a> 
												<a title="删除" href="/RoleServlet?id=${actor.roleId}&flag=del"
												class="t-del glyphicon glyphicon-trash"></a></td>
										</tr>
									</c:forEach>
								</tbody>
							</table>
						</div>

						<!--分页显示-->
						<div class="row">
							<div class="col-md-6">
								<div class="pagination" style="margin: 0px;" role="alert"
									aria-live="polite" aria-relevant="all">显示 1 到 10 页 记录数57</div>
							</div>
							<div class="col-md-6" style="text-align: right;">
								<ul class="pagination" style="margin: 0px;">
									<li><a href="#" aria-label="Previous"> <span
											aria-hidden="true">&laquo;</span>
									</a></li>
									<li><a href="#">1</a></li>
									<li><a href="#">2</a></li>
									<li><a href="#">3</a></li>
									<li><a href="#">4</a></li>
									<li><a href="#">5</a></li>
									<li><a href="#" aria-label="Next"> <span
											aria-hidden="true">&raquo;</span>
									</a></li>
								</ul>
							</div>
						</div>
						<!--分页显示-->
					</div>
				</div>
				<!--表格结束 -->
			</div>
		</div>
	</div>
</body>
<script type="text/javascript">
	var addRole = document.querySelector("#addRole");
	addRole.onclick = function() {
		window.location.href="../admin/addRole.jsp";
	}
</script>
</html>